package education.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import education.dao.TestQuestionsDao;
import education.model.TestQuestions;
import education.service.TestQuestionsManager;

@Component("testQuestionManager")
public class TestQuestionsManagerImpl implements TestQuestionsManager {
	private TestQuestionsDao testQuestionsDao;

	public TestQuestionsDao getTestQuestionsDao() {
		return testQuestionsDao;
	}

	@Resource
	public void setTestQuestionsDao(TestQuestionsDao testQuestionsDao) {
		this.testQuestionsDao = testQuestionsDao;
	}

	public void delete(TestQuestions testQuestions) {
		// TODO Auto-generated method stub

	}

	public boolean delete(int id) {
		return testQuestionsDao.delete(id);
	}

	public int getCount() {
		// TODO Auto-generated method stub
		return testQuestionsDao.getCount();
	}

	public TestQuestions loadById(int id) {		
		System.out.println("TestQuestionsManager is loadById");
		return testQuestionsDao.loadById(id);
	}

	public List<TestQuestions> paging(int pageSize, int pageCount, int rowCount) {
		return testQuestionsDao.paging(pageSize, pageCount, rowCount);
	}

	public void save(TestQuestions testQuestions) {
		testQuestionsDao.save(testQuestions);
	}

	public boolean update(TestQuestions testQuestions) {
		// TODO Auto-generated method stub
		return testQuestionsDao.update(testQuestions);
	}

}
